from django.conf.urls.defaults import patterns, include, url
import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'snakeWords.views.home', name='home'),
    # url(r'^snakeWords/', include('snakeWords.foo.urls')),
    (r'^$', 'snakeWords.jeux.views.index'),
    url(r'^game/(\d+)/$', 'snakeWords.jeux.views.get_game', name='game'),
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^game/(\d+)/play/$', 'snakeWords.jeux.views.game_play'),
    url(r'^game/(\d+)/ismyturn/$', 'snakeWords.jeux.views.isMyturn'),
    url(r'^game/(\d+)/finish/$', 'snakeWords.jeux.views.game_finish'),
    url(r'^game/(\d+)/skip/$', 'snakeWords.jeux.views.game_skip'),    
    url(r'^game/dictionary/$', 'snakeWords.jeux.views.word_in_dictionary'),
    url(r'^static/(.*)$', 'django.views.static.serve', {'document_root':settings.STATIC_ROOT}),
    url(r'^accounts/login/$', 'django.contrib.auth.views.login'),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}),
)
